<!--
  @author heguanghua
  @since 2019/06/12 11:57
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        <a th:lay-href="|/msg/temp/listByGroupId.action?groupId=${obj.groupId}|">模板管理</a>&nbsp;&nbsp;/&nbsp;
        <zmn th:text="${obj.name}"/>&nbsp;/&nbsp;
        <zmn>渠道配置</zmn>
    </blockquote>

    <div class="layui-card">
        <div th:replace="message/_tab::tab"></div>

        <form method="POST" class="layui-form" action="/msg/temp/conf/configChannel.action">
            <input type="hidden" name="templateId" th:value="${obj.templateId}"/>
            <div th:replace="message/config/channel/_query::query"></div>
        </form>

        <div class="layui-card-body">

            <div th:replace="message/config/channel/_table::table"></div>

            <script type="text/html" id="zmn-table-tool">
                <div class="layui-btn-container">
                    <div class="layui-btn-group" th:if="${#authPermit.checkPermit('/msg/temp/addEdit.action')}">
                        <button class="layui-btn layui-btn-sm" lay-event="del">移除</button>
                    </div>
                    <div class="layui-btn-group" th:if="${#authPermit.checkPermit('/msg/temp/addEdit.action')}">
                        <button class="layui-btn layui-btn-sm layui-btn-primary" lay-event="select">+新增</button>
                    </div>
                </div>
            </script>

        </div>

    </div>

</div>
</body>
</html>

<script type="text/html" id="zmn-table-bar">
    {{#if(json.hasViewDel){ }}
    <a style="color: #00a0e9" lay-event="del">移除</a>&nbsp;&nbsp;
    {{#}}}
</script>

<script type="text/javascript" th:inline="javascript">

    var json = {
        totalCount: [[${query.totalCount}]],
        pageSize: [[${query.pageSize}]],
        pageIndex: [[${query.pageIndex}]],
        query: [[${query}]],
        templateId: [[${obj.templateId}]],
        hasViewDel: [[${#authPermit.checkPermit('/msg/temp/addEdit.action')}]]
    };
    console.log(json.templateId)
    layui.config({
        base: "/static/lay/",
        version: 201910161937
    }).extend({
        index: "lib/index",
        msg_template_config_channel_list: "message/config/zmn.msg.template.config.channel.list",
    }).use(['index', 'msg_template_config_channel_list']);

</script>
